import { Controller } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
<% if (plus) { %>import { creatController, CrudPlus } from '@crudjs/crud-plus';<% } else { %>import { Crud } from '@crudjs/crud';<% } %>

import { <%= singular(classify(name)) %> } from './<%= singular(name) %>.entity';
import { <%= classify(name) %>Service } from './<%= name %>.service';

@CrudPlus({
  model: { type: <%= singular(classify(name)) %> },
})
@ApiTags('<%= name %>')
@Controller('/<%= routePrefix %><%= name %>')
export class <%= classify(name) %>Controller <% if (plus) { %>extends creatController(<%= singular(classify(name)) %>) <% } %>{
  constructor(public service: <%= classify(name) %>Service) {
    <% if (plus) { %>super(service);<% } %>
  }
}
